package p0;

public class Leetcode_58 {
    public int lengthOfLastWord(String s) {
        String[] ss = s.trim().split(" ");
        return ss[ss.length - 1].length();
    }

    public static void main(String[] args) {
        Leetcode_58 l = new Leetcode_58();
        System.out.println(l.lengthOfLastWord("hello wolrd"));
    }
}
